package xyz.doikki.dkplayer.widget.component;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.Animation;
import android.widget.ProgressBar;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import xyz.doikki.videoplayer.controller.ControlWrapper;
import xyz.doikki.videoplayer.controller.IControlComponent;

/**
 * Created by 聪明一只哈 on 2024-01-12.
 * Time: 2024-01-12  11:08
 */

public class MyProgress extends ProgressBar implements IControlComponent {

  private ControlWrapper mControlWrapper;

  public MyProgress(Context context) {
    super(context);
  }

  public MyProgress(Context context, AttributeSet attrs) {
    super(context, attrs);
  }

  public MyProgress(Context context, AttributeSet attrs, int defStyleAttr) {
    super(context, attrs, defStyleAttr);
  }

  @Override
  public void attach(@NonNull ControlWrapper controlWrapper) {
    mControlWrapper = controlWrapper;
  }

  @Nullable
  @Override
  public View getView() {
    return this;
  }

  @Override
  public void onVisibilityChanged(boolean isVisible, Animation anim) {

  }

  @Override
  public void onPlayStateChanged(int playState) {

  }

  @Override
  public void onPlayerStateChanged(int playerState) {

  }

  @Override
  public void setProgress(int duration, int position) {
    this.setProgress(50);
  }

  @Override
  public void onLockStateChanged(boolean isLocked) {

  }
}
